Skip to content

Python: fix nested import stars#1489

Merged
taus-semmle merged 2 commits into
github:rc/1.21from
markshannon:python-fix-nested-import-stars
Jun 24, 2019
Merged

Python: fix nested import stars#1489
taus-semmle merged 2 commits into
github:rc/1.21from
markshannon:python-fix-nested-import-stars

Conversation

@markshannon

Copy link
Copy Markdown
Contributor

Suppose the have a package foo containing foo/__init__.py and foo/foo.py where
foo/__init__.py contains of from .foo import * and
foo/foo.py contains def foo(): pass.
Then, when we analyse the code from foo import *; foo we get both the module foo.foo and the function foo for foo.

This PR fixes that so that we only get the function foo.

@markshannon markshannon added this to the 1.21.0 milestone Jun 24, 2019
@markshannon markshannon force-pushed the python-fix-nested-import-stars branch from bcfe209 to 9bf67e1 Compare June 24, 2019 14:21

@taus-semmle taus-semmle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@taus-semmle taus-semmle merged commit a254a84 into github:rc/1.21 Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants